import { FormProps, FormSchema } from '@/components/Table';
import { BasicColumn } from '@/components/Table/src/types/table';

export function getBasicColumns(): BasicColumn[] {
  return [
    {
      title: '线索名称',
      dataIndex: 'sourcesName',
    },
  ];
}

export const schemas: FormSchema[] = [
  {
    field: 'sourcesName',
    component: 'Input',
    label: '线索名称',
    colProps: {
      span: 8,
    },
    required: true,
  },
];
export function getFormConfig(): Partial<FormProps> {
  return {
    labelWidth: 120,
    autoAdvancedLine: 4,
    schemas: schemas.slice(1, schemas.length - 1).map((item) => ({
      ...item,
      colProps: {
        span: 6,
      },
      required: false,
    })),
  };
}
